<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <title>lu_CostManagement_DepreciationExpense 费用管理-折旧费用</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />

    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/animate.min.css" rel="stylesheet">
    <link href="css/style.min.css" rel="stylesheet">
    <link href="css/jquery.magnify.css" rel="stylesheet">
    <link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

    <link rel="stylesheet" href="css/lu_common.css">
    <link rel="stylesheet" href="css/lu_projectProgress.css">
    <link rel="stylesheet" href="css/lu_CostManagement.css">
    <link rel="stylesheet" href="fonts_style/iconfont.css">
</head>
<body class="color_fff container-fluid row" style="background-color: #fff">
<ul class="row projectProgress_BOX">
    <li class="col-sm-1"><a href="lu_CostManagement_people.html" class="projectProgress_titleText">人员人工费用</a></li>
    <li class="col-sm-1"><a href="lu_CostManagement_DirectConsumption.html" class="projectProgress_titleText">直接消耗</a></li>
    <li class="col-sm-1"><a href="lu_CostManagement_IndirectConsumption.html" class="projectProgress_titleText">其他直接投入</a></li>
    <li class="col-sm-1 active"><a href="lu_CostManagement_DepreciationExpense.html" class="projectProgress_titleText">折旧费用</a></li>
    <li class="col-sm-1"><a href="lu_CostManagement_intangibleAssets.html" class="projectProgress_titleText">无形资产</a></li>
    <li class="col-sm-1"><a href="lu_CostManagement_NewProjectDesignCost.html" class="projectProgress_titleText">新产品设计费</a></li>
    <li class="col-sm-1"><a href="lu_CostManagement_EntrustDevelopmentCost.html" class="projectProgress_titleText">委托研发费用</a></li>
    <li class="col-sm-1"><a href="lu_CostManagement_AboutOtherCost.html" class="projectProgress_titleText">其他相关费用</a></li>
</ul>
<div class="row projectProgress_table_BOX">
    <div class="table_BOX">
        <table class="col-sm-12 table table-striped comTableStyle" id="table_table">
            <thead>
            <tr>
                <th><input type="checkbox" id="checkAll" class="checkboxStyle"></th>
                <th>凭证号</th>
                <th>日期</th>
                <th>借/贷选择</th>
                <th>发生额(元)</th>
                <th>仪器/设备</th>
                <th>费用金额(元)</th>
                <th>摘要</th>
                <th>费用凭证</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr data-index="6">
                <td><input type="checkbox" class="checkboxStyle"></td>
                <td>记-0408</td>
                <td>2017年1月30日</td>
                <td>借</td>
                <td>5000</td>
                <td>设备</td>
                <td>154635.55</td>
                <td class="look_record">
                    <a href="#" class="look_record_btn">查看</a>
                    <div class="tip_hiddenBox work_record_box">
                        <span class="work_record_title">摘要</span>
                        <p class="work_record_main">12345678912341564sfabkwehdkjsnfajkbjkdbvnj59789</p>
                        <button class="btn btn-sm btn-success">确认</button>
                    </div>
                </td>
                <td><a href="look_img" class="edit_table">查看</a></td>
                <td><a href="edit_people" class="edit_table">编辑</a></td>
            </tr>
            <tr>
                <td><input type="checkbox" class="checkboxStyle"></td>
                <td>记-0408</td>
                <td>2017年1月30日</td>
                <td>借</td>
                <td>5000</td>
                <td>设备</td>
                <td>154635.55</td>
                <td class="look_record">
                    <a href="#" class="look_record_btn">查看</a>
                    <div class="tip_hiddenBox work_record_box">
                        <span class="work_record_title">摘要</span>
                        <p class="work_record_main">12345678912341564sfabkwehdkjsnfajkbjkdbvnj59789</p>
                        <button class="btn btn-sm btn-success">确认</button>
                    </div>
                </td>
                <td><a href="look_img" class="edit_table">查看</a></td>
                <td><a href="edit_people" class="edit_table">编辑</a></td>
            </tr>
            </tbody>
        </table>
        <div class="hidden_box">
            <div class="hidden_box_showBox ">
                <span id="dateVal">全部</span>
                <i class="iconfont icon-jiantou"></i>
            </div>
            <ul class="hidden_box_hiddenBox">
                <li class=" hidden_box_hiddenBox_list ">
                    <span class="hiddenBox_list_text">时间：</span>
                    <input type="text" class=" BFBFBF_inputStyle" id="query_time">
                </li>
                <li class=" hidden_box_hiddenBox_list ">
                    <span class="hiddenBox_list_text">仪器/设备：</span>
                    <!--<input type="text" class=" BFBFBF_inputStyle">-->
                    <select class="BFBFBF_inputStyle " name="" >
                        <option>仪器</option>
                        <option>设备</option>
                    </select>
                </li>
                <li class="hiddenBox_list_btn">
                    <button class="btn btn-sm btn-success" id="query">确定</button>
                    <button class="btn btn-sm btn-success">查找全部</button>
                    <button class="btn btn-sm btn-default">取消</button>
                </li>
            </ul>
        </div>
        <ul class="operation_btn">
            <li><a href="add_people" class="btn btn-success" addType="设备">添加<span>设备</span></a></li>
            <li><a href="add_people" class="btn btn-success" addType="仪器">添加<span>仪器</span></a></li>
            <!--<li><a href="#" class="btn btn-success">批量添加</a></li>-->
            <li><a href="#" class="btn btn-success">批量删除</a></li>
        </ul>
        <ul class="animated fadeIn add_hiddenBox" lll="add_people" id="add_people">
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>凭证号：</label>
                <div class="col-sm-9 select_box">
                    <select class="form-control table_btn_list_selectStyle select_voucher" add_name="add_voucher_type">
                        <option>记</option>
                        <option>收</option>
                        <option>付</option>
                        <option>转</option>
                    </select>
                    <input type="text" class="BFBFBF_inputStyle add_people_input" placeholder=""  add_name="add_voucher_num" id="add_voucher_num">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>日期：</label>
                <div class="col-sm-9">
                    <input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" id="add_time" add_name="add_time">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>借/贷选择：</label>
                <div class="col-sm-9">
                    <!--<input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" add_name="add_name">-->
                    <select class="form-control table_btn_list_selectStyle" add_name="add_borrowingChoose">
                        <option value="1">借</option>
                        <option value="2">贷-资本化</option>
                        <option value="3">贷-费用化</option>
                    </select>
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 control-label table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>发生额(元)：</label>
                <div class="col-sm-9">
                    <input type="number" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" add_name="add_happenMoney">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>摘要：</label>
                <div class="col-sm-9">
                    <!--<input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" add_name="add_SoftwareAmortization">-->
                    <textarea class="textarea_style" add_name="add_abstract"></textarea>
                </div>
            </li>
            <li class="form-group table_btn_list table_btn_list_top">
                <label class="col-sm-3 table_btn_list_title table_btn_list_title_top"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>选择设备：</label>
                <div class="col-sm-9">
                    <ul class="Material_list">

                    </ul>
                    <select class="form-control table_btn_list_selectStyle Choose_Material_list" add_name="add_Choose_equipment">
                        <!--<option>技术部1</option>-->
                        <!--<option>技术部2</option>-->
                        <!--<option>技术部3</option>-->
                        <!--<option>技术部4</option>-->
                    </select>
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>关联合计：</label>
                <div class="col-sm-9">
                    <input type="number" class="col-sm-9 BFBFBF_inputStyle add_people_input" readonly add_name="add_Relation_sum" value="0">
                </div>
            </li>
            <li class="form-group table_btn_list table_btn_list_top">
                <label class="col-sm-3 table_btn_list_title table_btn_list_title_top">凭证：</label>
                <div class="col-sm-9 pz_file_box">
                    <button class="btn btn-success hidden_input_box">点击上传<input type="file" accept="image/*" class="hidden_input" add_name="add_file"></button>
                    <ul class="pz_file_list">

                    </ul>
                </div>
            </li>
            <li class="button_list">
                <button class="btn btn-sm btn-success" id="add_btn">确认添加</button>
                <button class="btn btn-sm btn-success" id="add_AddNew_btn">添加并新增</button>
                <button class="btn btn-sm btn-default cancel_btn">取消</button>
            </li>
        </ul>
        <ul class="animated fadeIn add_hiddenBox" lll="edit_people" id="edit_people">
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>凭证号：</label>
                <div class="col-sm-9 select_box">
                    <select class="form-control table_btn_list_selectStyle select_voucher" add_name="edit_voucher_type">
                        <option>记</option>
                        <option>收</option>
                        <option>付</option>
                        <option>转</option>
                    </select>
                    <input type="text" class="BFBFBF_inputStyle add_people_input" placeholder=""  add_name="edit_voucher_num" id="edit_voucher_num">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>日期：</label>
                <div class="col-sm-9">
                    <input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" id="edit_time" add_name="edit_time">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>借/贷选择：</label>
                <div class="col-sm-9">
                    <!--<input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" add_name="add_name">-->
                    <select class="form-control table_btn_list_selectStyle" add_name="edit_borrowingChoose">
                        <option value="1">借</option>
                        <option value="2">贷-资本化</option>
                        <option value="3">贷-费用化</option>
                    </select>
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 control-label table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>发生额(元)：</label>
                <div class="col-sm-9">
                    <input type="number" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" add_name="edit_happenMoney">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>摘要：</label>
                <div class="col-sm-9">
                    <!--<input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" add_name="add_SoftwareAmortization">-->
                    <textarea class="textarea_style" add_name="edit_abstract"></textarea>
                </div>
            </li>
            <li class="form-group table_btn_list table_btn_list_top">
                <label class="col-sm-3 table_btn_list_title table_btn_list_title_top"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>选择设备：</label>
                <div class="col-sm-9">
                    <ul class="Material_list">

                    </ul>
                    <select class="form-control table_btn_list_selectStyle Choose_Material_list" add_name="edit_Choose_equipment">
                        <!--<option>技术部1</option>-->
                        <!--<option>技术部2</option>-->
                        <!--<option>技术部3</option>-->
                        <!--<option>技术部4</option>-->
                    </select>
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>关联合计：</label>
                <div class="col-sm-9">
                    <input type="number" class="col-sm-9 BFBFBF_inputStyle add_people_input" readonly add_name="edit_Relation_sum" value="10">
                </div>
            </li>
            <li class="form-group table_btn_list table_btn_list_top">
                <label class="col-sm-3 table_btn_list_title table_btn_list_title_top">凭证：</label>
                <div class="col-sm-9 pz_file_box">
                    <button class="btn btn-success hidden_input_box">点击上传<input type="file" accept="image/*" class="hidden_input" add_name="edit_file"></button>
                    <ul class="pz_file_list">

                    </ul>
                </div>
            </li>
            <li class="button_list">
                <button class="btn btn-sm btn-success" id="save_btn">保存</button>
                <button class="btn btn-sm btn-default cancel_btn">取消</button>
            </li>
        </ul>
    </div>

    <!--内容没填完，弹框-->
    <div class="warning_hiddenBox animated fadeIn" id="yz_modal" box="yz_modal">
        您有内容没有填写完哦！
    </div>
    <!--删除人员-->
    <div class="add_hiddenBox animated fadeIn" id="delete" lll="delete">
        <p class="delete_tip_text">确认删除吗？</p>
        <div class="delete_tip_btn_box">
            <button class="btn btn-sm btn-success">确认</button>
            <button class="btn btn-sm btn-default">取消</button>
        </div>
    </div>
    <!--查看凭证-->
    <div class="add_hiddenBox animated fadeIn" id="look_img" lll="look_img" >
        <ul class="look_img_list">
            <!--<li><a data-magnify="gallery" href="img/a1.png"><img src="img/ic_3@2x.png"></a></li>-->
            <!--<li><a data-magnify="gallery" href="img/a2.png"><img src="img/ic_6@2x.png"></a></li>-->
            <!--<li><a data-magnify="gallery" href="img/a3.png"><img src="img/ic_food2.png"></a></li>-->
            <!--<li><a data-magnify="gallery" href="img/a3.png"><img src="img/ic_food2.png"></a></li>-->
            <!--<li><a data-magnify="gallery" href="img/a3.png"><img src="img/ic_food2.png"></a></li>-->
        </ul>
        <div class="delete_tip_btn_box">
            <button class="btn btn-sm btn-success">确认</button>
        </div>
    </div>
</div>

<script src="js/jquery.min.js"></script>
<script src="js/jquery.magnify.js"></script>
<script src="js/laydate/laydate.js"></script>
<script src="js/lu_CostManagement_DepreciationExpense.js"></script>
<script>
    $(function(){
        $('[data-magnify=gallery]').magnify({
            headToolbar: [
                'close'
            ],
            footToolbar: [
                'zoomIn',
                'zoomOut',
                'prev',
                'fullscreen',
                'next',
                'actualSize',
                'rotateRight'
            ],
            title: false
        });

        window.query_time=''

        laydate.render({
            elem: '#query_time', //指定元素
            type: 'month',
            theme: '#2881C1',
            done: function(value, date, endDate){
                var dateVal = date.year+'年'+date.month+'月'
                window.query_time = dateVal
            }
        });
        laydate.render({
            elem: '#add_time', //指定元素
            type: 'month',
            theme: '#2881C1',
            done: function(value, date, endDate){
                let url = window.sessionStorage['addType']=='设备'?'http://jk.com/Admin/CostDevice/getCalDevInfo':'http://jk.com/Admin/CostDevice/getCalEquInfo'
                $.ajax({
                    url: url,
                    type:'get',
                    data:{
                        time:value
                    },
                    success:function(data){
                        console.log(data)
                        if(data.code==1){
                            let datas = data.data
                            let htmls = ''
                            for(let i=0;i<datas.length;i++){
                                htmls += `
                                    <option value="${datas[i].money}" data-id="${datas[i].id}">${datas[i].dev_name}</option>
                                `
                            }
                            console.log($('#add_people').find('[add_name=add_Choose_equipment]'))
                            $('#add_people').find('[add_name=add_Choose_equipment]').html(htmls);
                        }else{
                            $('#yz_modal').html(data.msg)
                            $('#yz_modal').addClass('active')
                            tipShow()
                            return
                        }
                    }
                })
            }
        });
        laydate.render({
            elem: '#eait_time', //指定元素
            type: 'month',
            theme: '#2881C1',
            done: function(value, date, endDate){
                let url = window.sessionStorage['addType']=='设备'?'http://jk.com/Admin/CostDevice/getCalDevInfo':'http://jk.com/Admin/CostDevice/getCalEquInfo'
                $.ajax({
                    url: url,
                    type:'get',
                    data:{
                        time:value
                    },
                    success:function(data){
                        console.log(data)
                        if(data.code==1){
                            let datas = data.data
                            let htmls = ''
                            for(let i=0;i<datas.length;i++){
                                htmls += `
                                    <option value="${datas[i].money}" data-id="${datas[i].id}">${datas[i].dev_name}</option>
                                `
                            }
                            $('#edit_people').find('[add_name=edit_Choose_equipment]').html(htmls);
                        }else{
                            $('#yz_modal').html(data.msg)
                            $('#yz_modal').addClass('active')
                            tipShow()
                            return
                        }
                    }
                })
            }
        });

        // 弹出来的小框框
        function tipShow(){
            window.tipBox = setTimeout(function(){
                // $('#yz_modal').removeClass('active')
                // $('#yz_modal').addClass('fadeOut')
                $('#yz_modal').removeClass('active')
                clearTimeout(tipBox)
            },2000)
        }
    })
</script>
</body>
</html>